import {INodeImpl} from "@rockyf/easy-design";

export default function () {
  return {
    setup(): HTMLElement {
      const el = document.createElement('img')
      el.classList.add('node-image')
      el.draggable=false
      el.style.display = 'block'
      return el
    },
    hooks: {
      update(props?: Record<string, any>) {
        this.host!.setAttribute('src', props?.src)
      },
    }
  } as INodeImpl
}